Check the source code file "rg.c" for the real details.
This program allows you to force your guest account back to an initial state after any user has logged out. This makes it easier to ensure that each person logging into the guest account will find exactly the setup you intended, without any leftover garbage of a previous user. Permanent changes to the guest account can be made by logging into a template account whose password can be more closely guarded.
Since making this code useful requires changing #defines and recompiling, I have not included an executable version of the program.
This program is free for use and abuse. Since it changes and overwrites directories, beware, it can be dangerous. I am giving it away as an example and make no guarantees of its servicability whatsoever.